package org.semanticflash.rdf
{
	
	import org.semanticflash.rdf.values.IRDFValueHolder;
	import org.semanticflash.rdf.values.RDFValue;
	import org.semanticflash.rdf.values.RDFValueCodec;




	/**
	* 
	*/
	public function getTerm( value:* ):RDFValue
	{

		if ( value == null )
		{
			return null;
		}


		if ( value is RDFValue )
		{
			return value;
		}
		
		if ( value is IRDFValueHolder )
		{
			return ( value as IRDFValueHolder ).rdfValue;
		}	
	
		return RDFValueCodec.fromAS3( value );
	
	}



}